cmake_minimum_required(VERSION 3.5.0)

set(PROJECT_NAME detect)
project(detect)

# set ascend path
set(ToolChainRoot "/usr/local/Ascend/ascend-toolkit/latest")

# add global include
include_directories(${ToolChainRoot}/include ${ToolChainRoot}/acllib/include/)
link_directories(${ToolChainRoot}/aarch64-linux/devlib/ ${OpenCV_LIBS})
find_package(OpenCV REQUIRED)

add_executable(PROJECT_NAME main.cpp ./src/basic.cpp ./src/yolo.cpp)

target_include_directories(PROJECT_NAME PUBLIC ${CMAKE_SOURCE_DIR}/include)
target_link_libraries(PROJECT_NAME ${OpenCV_LIBS} ascendcl dl rt)

